<?php

namespace backend\models;

use Yii;
use yii\data\ActiveDataProvider;


/**
 * This is the model class for table "{{%goods}}".
 *
 * @property integer $id
 * @property string  $image
 * @property string $project_name
 */
class Goods extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName ()
    {
        return '{{%goods}}';
    }

    /**
     * @inheritdoc
     */
    public function rules ()
    {
        return [
            [ ["pid","name","model","num","price","all_price","use_num","unit","image"] , 'required' ] ,
            [ ["project_name","buy_time","recipient","provider","history_user",'history_user','history_project'] , 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels ()
    {
        return [
            'id'           => ' Banner ID' ,
            'pid'          => '项目名称' ,
            'name'         => '物资名称' ,
            'model'        => '规格型号' ,
            'num'          => '数量' ,
            'price'        => '单价' ,
            'all_price'    => '总价' ,
            'use_num'      => '使用数' ,
            'recipient'    => '领取人' ,
            'provider'     => '供应商' ,
            'history_user' => '历史用户' ,
            'unit'         => '物资单位' ,
            'image'        => '物资图片' ,
            'buy_time'     => '购买时间' ,
            'project_name' => '项目名称',
            'history_user' => '历史用户',
            'history_project' => '历史所在项目',
        ];
    }
}
